/**
Company: Sarkar software technologys
WebSite: http://www.sarkar.cn
Author: yeganaaa
Date : 5/16/18
Time: 4:58 PM
 */

package Cn.Sarkar.IMS.Entities

import Cn.Sarkar.Entities.Common.BaseEntity
import Cn.Sarkar.Entities.IMS.*
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.IMS.DataBaseDefinations.SellOrderItems

class SellOrderItem(DataContext: IDataContext) : IBuyOrderItem, BaseEntity(DataContext, SellOrderItems) {
    var applicationDomainID by SellOrderItems.ApplicationDomainID
    override var applicationDomain: IIMSApplicationDomain by hasOne(SellOrderItems.ApplicationDomainID) { IMSApplicationDomain(it) }
    var orderID by SellOrderItems.OrderID
    override var order: IBuyOrder by hasOne(SellOrderItems.OrderID) { BuyOrder(it) }
    var productID by SellOrderItems.ProductID
    override var product: IProduct by hasOne(SellOrderItems.ProductID) { Product(it) }
    override var number: Float by SellOrderItems.Number
}